package com.example.springboot.mapper;

import com.example.springboot.controller.request.BaseRequest;
import com.example.springboot.entity.Appointment;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper //@Mapper注解将mapper标注为spring的一个组件
//使用mapper将数据传入数据库
public interface AppointmentMapper {

//用户列表
    List<Appointment> list();

    List<Appointment> listByCondition(BaseRequest baseRequest);

    void save(Appointment appointment);

    Appointment getById(Integer id);

    void updateById(Appointment appointment);

    void deleteById(Integer id);

//    Appointment getByAppointmentName(String appointmentName);
//
//    Appointment getByAppointmentNameAndPassword(@Param("appointmentName") String appointmentName, @Param("password") String password);

}
